import { Socket } from 'socket.io';

const connectionTable = { };

export function addConnection(agentIdentity: string, connection: Socket) {
  connectionTable[agentIdentity] = connection;
}

export function deleteConnection(agentIdentity: string) {
  delete connectionTable[agentIdentity];
}

export function getConnection(agentIdentity: string): Socket {
  return connectionTable[agentIdentity];
}